import request from '@/utils/request'

export function list(query) {
	return request({
		url: '/iot/device/list',
		method: 'get',
		params: query
	})
}

export function get(query) {
	return request({
		url: '/iot/device/get',
		method: 'get',
		params: query
	})
}

export function create(query) {
	return request({
		url: '/iot/device/create',
		method: 'post',
		params: query
	})
}

export function update(query) {
	return request({
		url: '/iot/device/update',
		method: 'post',
		params: query
	})
}

export function setGateway(query) {
	return request({
		url: '/iot/device/setGateway',
		method: 'post',
		params: query
	})
}

export function deleteDevice(query) {
	return request({
		url: '/iot/device/delete',
		method: 'post',
		params: query
	})
}
